package com.qdc.datacenters.client;

import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Post;
import com.dtflys.forest.annotation.Retry;
import com.qdc.datacenters.domain.query.qw.QwMsgAuditQuery;
import com.qdc.datacenters.domain.vo.qw.QwMsgAuditVo;
import com.qdc.datacenters.handler.QwCommonRetryWhenHandler;
import com.qdc.datacenters.interceptor.forest.ChatMsgAccessTokenInterceptor;

/**
 * @author danmo
 * @description 会话存档接口
 * @date 2024-02-29 16:31
 **/
@BaseRequest(baseURL = "${qwServerUrl}", interceptor = ChatMsgAccessTokenInterceptor.class)
@Retry(maxRetryCount = "3", maxRetryInterval = "1000", condition = QwCommonRetryWhenHandler.class)
public interface ChatMsgAuditClient {

    /**
     * 获取会话内容存档开启成员列表
     */
    @Post(url = "/msgaudit/get_permit_user_list")
    QwMsgAuditVo getPermitUserList(@JSONBody QwMsgAuditQuery query);

    /**
     * 单聊 获取会话中外部成员的同意情况
     *
     * @param query
     * @return
     */
    @Post(url = "/msgaudit/check_single_agree")
    QwMsgAuditVo checkSingleAgree(@JSONBody QwMsgAuditQuery query);

    /**
     * 群聊 获取群会话中外部成员的同意情况
     *
     * @param query
     * @return
     */
    @Post(url = "/msgaudit/check_room_agree")
    QwMsgAuditVo checkRoomAgree(@JSONBody QwMsgAuditQuery query);

    /**
     * 获取会话内容存档内部群信息
     *
     * @param query
     * @return
     */
    @Post(url = "/msgaudit/groupchat/get")
    QwMsgAuditVo getGroupChat(@JSONBody QwMsgAuditQuery query);
}
